//演示动态表单渲染及提交
<template>
  <div>
    <fm-generate-form :data="jsonData" ref="generateForm"></fm-generate-form>
    <el-button type="primary" @click="handleSubmit">提交</el-button>
  </div>
</template>

<script>
  export default {
    props: ['row'],
    data() {
      return {
        jsonData:{}
      }
    },
    created() {
      this.jsonData = JSON.parse(this.row.form_json)
    },
    methods: {
      handleSubmit () {
        this.$refs.generateForm.getData().then(data => {
          alert(JSON.stringify(data))
        }).catch(e => {
        })
      }
    }
  }
</script>
